import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter);

import Mobile from '@/view/Mobile.vue'
import MobileHome from '@/view/mobile/MobileHome.vue'
import MobileAdmin from '@/view/mobile/MobileAdmin.vue'
import MobileHeader from '@/components/mobile/default/MobelHeader.vue'
import MobileFooter from '@/components/mobile/default/MobelFooter.vue'
import MobileBook from '@/view/mobile/MobileBook.vue'
import detail from '@/components/mobile/detail.vue'
import MobileFind from '@/components/mobile/MobileFind.vue'
import MobileSearch from '@/view/mobile/MobileSearch.vue'
import MobileShopping from '@/components/mobile/adm/MobileShopping.vue'
import admin from '@/view/admin.vue'
import Mobileorders from '@/components/mobile/adm/Mobileorders.vue'
import Shoppingcart from '@/components/mobile/adm/Shoppingcart.vue'



import admMain from '../view/pc/adm/admMain.vue'
import Home from '../view/pc/Home.vue'
import login from '../view/pc/login.vue'
import AdminLogin from '@/components/admin/AdminLogin'
import PCFirst from '../view/pc/PCFirst.vue'
import PC from '@/view/PC.vue'
import PCHeader from '@/view/pc/default/PCHeader.vue'
import hotPic from '@/view/pc/adm/hotPic.vue'
import updatePic from '@/view/pc/adm/updatePic.vue'
import addPic from '@/view/pc/adm/addPic.vue'
import ListPic from '@/view/pc/commodity/ListPic.vue'
import findOrder from '@/view/pc/orders/findOrder.vue'
import upPic from '@/view/pc/commodity/upPic.vue'
import SecondType from '@/view/pc/Type/SecondType.vue'
import FirstType from '@/view/pc/Type/FirstType.vue'
import addShp from '@/view/pc/commodity/addShp.vue'
import add2 from '@/view/pc/Type/add2.vue'
const routes = [{
		path: '/',
		redirect: '/mobile/home'
	},
	{
		path: '/login',
		name: 'login',
		component: login,
	},
	{
		path: '/PC',
		name: 'PC',
		component: PC,
		children: [{
				path: 'First',
				name: 'PCFirst',
				components: {
					default: PCFirst,
					header: PCHeader,
					side: admMain
				},
			},
			{
				path: 'HotPic',
				name: 'hotPic',
				components: {
					default: hotPic,
					header: PCHeader,
					side: admMain
				},
			},
			{
				path: 'updatePic',
				name: 'updatePic',
				components: {
					default: updatePic,
					header: PCHeader,
					side: admMain
				},
			},
			{
				path: 'addPic',
				name: 'addPic',
				components: {
					default: addPic,
					header: PCHeader,
					side: admMain
				},
			},
			{
				path: 'ListPic',
				name: 'ListPic',
				components: {
					default: ListPic,
					header: PCHeader,
					side: admMain
				},
			},
			{
				path: 'findOrder',
				name: 'findOrder',
				components: {
					default: findOrder,
					header: PCHeader,
					side: admMain
				},
			},
			{
				path: 'upPic',
				name: 'upPic',
				components: {
					default: upPic,
					header: PCHeader,
					side: admMain
				},
			},
			{
				path: 'FirstType',
				name: 'FirstType',
				components: {
					default: FirstType,
					header: PCHeader,
					side: admMain
				},
			},
			{
				path: 'SecondType',
				name: 'SecondType',
				components: {
					default: SecondType,
					header: PCHeader,
					side: admMain
				},
			},
			{
				path: 'add2',
				name: 'add2',
				components: {
					default: add2,
					header: PCHeader,
					side: admMain
				},
			},
			{
				path: 'addShp',
				name: 'addShp',
				components: {
					default: addShp,
					header: PCHeader,
					side: admMain
				},
			},
		]
	}, {
		path: '/mobile',
		name: 'Mobile',
		component: Mobile,
		children: [{
				path: 'home',
				name: 'MobileHome',
				components: {
					default: MobileHome,
					header: MobileHeader,
					footer: MobileFooter
				},
			},
			{
				path: 'book',
				name: 'MobileBook',
				components: {
					default: MobileBook,
					header: MobileHeader,
					footer: MobileFooter
				}
			},
			{
				path: 'detail',
				name: 'detail',
				components: {
					default: detail,
					footer: MobileFooter
				},
			},
			{
				path: 'admin',
				name: 'MobileAdmin',
				components: {
					default: MobileAdmin,
					header: MobileHeader,
					footer: MobileFooter
				},
			},
			{
				path: 'shopping',
				name: 'MobileShopping',
				components: {
					default: MobileShopping,
				}
			},
			{
				path: 'orders',
				name: 'Mobileorders',
				components: {
					default: Mobileorders,
				}
			},
			{
				path: 'MobileFind',
				name: 'MobileFind',
				components: {
					default: MobileFind,
				},
			},
			{
				path: 'search',
				name: 'MobileSearch',
				component: MobileSearch
			},
			{
				path: 'Shoppingcart',
				name: 'Shoppingcart',
				component: Shoppingcart
				,
			},
		]
	},

]

const router = new VueRouter({
	routes,
})
export default router;